package com.chaihu.bean.entity.center;

import com.chaihu.bean.dto.order.ServiceDto;
import lombok.Data;

/**
 * 提供服务
 * Created by wuxw on 2018/4/14.
 */
@Data
public class AppService extends ServiceDto {

    public AppService builder(AppRoute appRoute) {
        this.setBusinessTypeCd(appRoute.getBusinessTypeCd());
        this.setMessageQueueName(appRoute.getMessageQueueName());
        this.setMethod(appRoute.getMethod());
        this.setName(appRoute.getName());
        this.setRetryCount(appRoute.getRetryCount());
        this.setSeq(appRoute.getSeq());
        this.setServiceCode(appRoute.getServiceCode());
        this.setTimeout(appRoute.getTimeout());
        this.setUrl(appRoute.getUrl());
        this.setServiceId(appRoute.getServiceId());
        this.setIsInstance(appRoute.getIsInstance());
        this.setStatusCd("1");
        return this;
    }

    public static AppService newInstance() {
        return new AppService();
    }


}
